<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="pojo.*,service.*,base.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script> 
function tiao(){
	location.href="../dishesType.jsp";
	};
	setTimeout(tiao,1000);
	</script>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
	String name = request.getParameter("name").trim();
	DishesTypeService service = new DishesTypeService();
	int r = service.add(name);
	
	if(r==1){
	
		out.print("添加成功！");
	}
		else
	out.print("添加失败！请重新添加<a href='../dishesType'>返回</a>");
%>
</body>
</html>
